#!/bin/bash
BUILD_TYPE=Debug
#sudo apt-get install libcurlpp-dev
#sudo apt-get install libgtk-3-dev
#git submodule update --init --recursive

#cd $BUILD_TYPE
#cmake ../ -DwxBUILD_SHARED=OFF -DwxBUILD_MONOLITHIC=ON --disable-debug --enable-no_rtti


BUILD_SYSTEM="Linux"
if [ "$(uname)" == "Darwin" ]; then
 BUILD_SYSTEM="Darwin"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then   
 BUILD_SYSTEM="Linux"
 export CXXFLAGS="-ffunction-sections -fdata-sections -Os"
 export LDFLAGS="-Wl,--gc-sections"
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then    
 BUILD_SYSTEM="W32"
fi
mkdir "build_$BUILD_SYSTEM"
cd  "build_$BUILD_SYSTEM"
#../configure  --disable-debug --enable-no_rtti --enable-monolithic --disable-shared
../configure  --disable-debug --enable-monolithic --disable-shared --prefix=$(pwd)
make -j4
